package org.oschina.api.manage.module.vo;

import org.oschina.Constants;
import org.oschina.bean.BaseBean;
import org.oschina.helper.query.annotation.Cache;
import org.oschina.helper.query.annotation.Table;

@Table(name=Constants.DB_MODULE)
@Cache(name=Constants.CACHE_MODULE,timeout=Constants.TIMEOUT_MODULE)
public class ModuleVo extends BaseBean {

	private Integer id;
	private Integer type;
	private String name;
	
	public Integer getType() {
		return type;
	}
	public void setType(Integer type) {
		this.type = type;
	}
	public Integer getId() {
		return id;
	}
	public String getName() {
		return name;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public void setName(String name) {
		this.name = name;
	}
	
	@Override
	public boolean equals(Object obj)
	{
		if(!(obj instanceof ModuleVo))
			return false;
		
		ModuleVo temp=(ModuleVo)obj;
		return (temp!=null && (getId().equals(temp.getId()) || getName().equals(temp.getName())));
	}
	
}